package ro.dta.idbi.interfaces.sql;

import com.mxgraph.model.mxGeometry;
import com.mxgraph.model.mxICell;

import uk.ac.ic.doc.automed.reps.SchemaObject;

/**
 * Interface for SQL constructs
 * 
 * @author Tudor Dobrila
 * 
 */
public interface ISqlConstruct extends mxICell, Cloneable {

	/**
	 * @return The AutoMed schema object
	 */
	SchemaObject getSchemaObject();

	/**
	 * Get the geometry description of the construct
	 */
	mxGeometry getGeometry();

	/**
	 * Get the value stored in this construct
	 */
	Object getValue();

	/**
	 * Set the new value stored in this construct
	 * 
	 * @param value
	 *            New value to store in this construct
	 */
	void setValue(Object value);

	/**
	 * Get the style name of the construct
	 */
	String getStyle();

	/**
	 * Set the style of the construct
	 * 
	 * @param style
	 *            New style of the construct
	 */
	void setStyle(String style);

	/**
	 * Get the parent of the construct
	 * 
	 * @return Parent of the construct
	 */
	mxICell getParent();

	/**
	 * Clone the column
	 * 
	 * @return A clone of the column
	 * @throws CloneNotSupportedException
	 */
	Object clone() throws CloneNotSupportedException;
	
	/**
	 * Construct the scheme defintion of the construct
	 * @return Scheme definition of the construct
	 */
	String getSchemeDefinition();

}